import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import store from './store'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import App from './App.vue'
import router from './router'
import './assets/main.css'
import './assets/iconfont/iconfont.js'; // 阿里矢量库
import SvgIcon from './assets/iconfont/SvgIcon.vue'
import Antd from 'ant-design-vue';
const app = createApp(App)
app.component('SvgIcon', SvgIcon);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//全局注册，可以直接使用
// app.component('MyComponent', defineAsyncComponent(() =>
//     import('./components/MyComponent.vue')
// ))
app.use(ElementPlus)
app.use(router)
app.use(store)
app.use(Antd)
app.mount('#app')
